//
//  Material.hpp
//  RayTracer
//
//  Created by 俞云康 on 2/15/16.
//  Copyright © 2016 yushroom. All rights reserved.
//

#ifndef Material_hpp
#define Material_hpp

#include "Math.hpp"
#include "BSDF.hpp"
#include "Texture.hpp"
#include "HitInfo.hpp"
#include "Sample.hpp"
#include <map>

class Params;

class Material {
public:
    string name;
    virtual ~Material() {}
    
//    // get diffuse color on the hit point
//    virtual Color diffuse(const HitInfo& hit) const = 0;
    
    static shared_ptr<Material> create(const Params& params);
    static vector<shared_ptr<Material>> materials;
    
    // emission
    virtual Color Le(const float3& wo) const {
        return {0, 0, 0};
    }
    
    virtual shared_ptr<BSDF> getBSDF(const HitInfo& hit) const = 0;
};


#endif /* Material_hpp */
